package com.bytz.modules.cms.order.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bytz.common.aspect.annotation.Dict;
import com.bytz.common.entity.IEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 莱宝CMS—订单管理-订单商品表
 * </p>
 *
 * @author KyleWang
 * @since 2022-10-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("cms_order_item")
@ApiModel(value = "OrderItem对象", description = "莱宝CMS—订单管理-订单商品表")
public class OrderItem implements Serializable, IEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "订单ID")
    private String orderId;

    @ApiModelProperty(value = "产品线Code")
    private String productLineCode;

    @ApiModelProperty(value = "产品ID")
    private String productId;

    @ApiModelProperty(value = "产品编码")
    private String productNumber;

    @ApiModelProperty(value = "产品描述")
    private String productDesc;

    @ApiModelProperty(value = "产品数量")
    private Integer productNum;

    @ApiModelProperty(value = "已发货数量")
    private Integer shippedNum;

    @ApiModelProperty(value = "等级名称")
    private String productLineLevelName;

    @ApiModelProperty(value = "不含税价")
    private BigDecimal noTaxPrice;

    @ApiModelProperty(value = "含税价")
    private BigDecimal includeTaxPrice;

    @ApiModelProperty(value = "协议价（含税）")
    private BigDecimal negotiatePrice;
    @ApiModelProperty(value = "协议价（不含税）")
    @TableField(exist = false)
    private BigDecimal noTaxNegotiatePrice;

    @ApiModelProperty(value = "优惠金额（使用优惠券平均抵扣）")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal deductionPrice;

    @ApiModelProperty(value = "含税总价")
    private BigDecimal totalTaxPrice;

    @ApiModelProperty(value = "预付金额")
    private BigDecimal prepayPrice;

    @ApiModelProperty(value = "已支付金额")
    private BigDecimal paidPrice;

    @ApiModelProperty(value = "产品标准交期（取产品目录交期）")
    private Integer deliveryDate;

    @ApiModelProperty(value = "期望交期")
    private LocalDateTime expectedDeliveryDate;

    @Dict(dicCode = "mall_order_ecRequired")
    @ApiModelProperty(value = "EC是否必填")
    private String ecRequired;

    @ApiModelProperty(value = "删除状态")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "创建人姓名")
    private String createByName;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新人")
    private String updateBy;

    @ApiModelProperty(value = "更新人姓名")
    private String updateByName;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;


}
